﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Default.Master" AutoEventWireup="true" CodeBehind="comment.aspx.cs" Inherits="MasterPageGroupF3.comment" %>
<%@ Import Namespace="BUS" %>
<%@ Import Namespace="DTO" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <ul class="clsmenuul">
        <li><a href="index.aspx">GIÁ TỐT HÔM NAY </a></li>
        <li><a href="GiaTotGanDay.aspx">GIÁ TỐT GẦN ĐÂY</a> </li>
        <li><a href="GiaTotSapToi.aspx">GIÁ TỐT SẮP TỚI</a> </li>
         <% if (Session["Provider"] != null)
            {%>
                <li><a href="DangTinKhuyenMai.aspx">ĐĂNG TIN KHUYẾN MÃI</a> </li> 
                 <li><a href="DanhSachDonDatHang.aspx">DS ĐƠN ĐẶT HÀNG</a> </li>
           <%}
            if (Session["UserName"] != null)
            {%>
                <li><a href="LichSuMuaHang.aspx">LỊCH SỬ MUA HÀNG</a> </li> 
                 <li><a href="TinhTrangDonHang.aspx">TÌNH TRẠNG ĐƠN HÀNG</a> </li>
            <%} %>
        <li><a href="ThaoLuan.aspx">THẢO LUẬN</a> </li>
        <li><a href="TroGiup.aspx">TRỢ GIÚP</a> </li>        
    </ul>  
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">

<div id="frameComment1">
    <div id="imageProductComment1">
        <%
            int product = int.Parse(Request.QueryString["IDProduct"].ToString());
            PRODUCT pro = PRODUCTBUS.LaySanPhamCoID(product);
            //a
            
            
            COMMENT[] comment = COMMENTBUS.layBangByID(product);
            String slodan = pro.SLOGAN.ToString();
            if (slodan.Length > 200)
                slodan = slodan.Substring(200) + "...";
            String content = pro.CONTENT.ToString();
            if (content.Length > 200)
                content = content.Substring(200) + "...";

            string image = "images/product/" + pro.IDPRODUCT.ToString() + "/1.jpg";                
             %>     
             <div style="float:left;margin-bottom:30px;margin-right:20px;">
                <img src="<%Response.Write(image); %>" alt="center" width="200px" height="200px"/>                               
            </div>
             <div style="color:#00CCFF;font-size:20px;height:200px;padding-top:80px;">
                <div style="margin-left:auto;margin-right:auto; width:100%">
                    <% Response.Write(slodan);              %>
                    <br />
                    <% Response.Write(content);              %>
                    </div>
              </div>
        </div>                   
    <div>
        <%                 
                 for (int i = 0; i < comment.Count(); ++i)
                 {
                  %>
                    <div id="contentComment1">
                        <%
                            string userComment = comment[i].USERNAME;
                            string commentx = comment[i].CONTENT;                                                                             
                      %>
                      <div class="commentxx1">
                        <div class="userNameComment1">
                         <%Response.Write(userComment); %>
                        </div>
                        
                        <input type="text" value="<%Response.Write(commentx);%>" style="width:578px;height:81px" />
                        </div>
                         
                    </div>
                  <%
                    } 
                      %>
    </div>
    <div>
        <div class="backGroundcommentFrame1">
            Viết Thảo Luận&nbsp;
        </div>
        <div>
            <div>
                
                &nbsp;</div>
        </div>
        <div id="commentFrame1">
        <asp:TextBox ID="TextBox3" runat="server" Height="81px" Width="578px"></asp:TextBox>
        </div>
        <div style="padding-left:100px;">

            <asp:FileUpload ID="FileUpload2" runat="server" />

        </div>
        <br />
        <div id="buttonGui1">            
            <asp:ImageButton ID="ImageButton5" runat="server" Height="26px" 
                ImageUrl="~/images/guiComment.png" Width="81px" 
                onclick="ImageButton1_Click" />
            
        </div>
    </div>
</div>
</asp:Content>
